﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chaos.messages
{
    public class request_server_info : message
    {
        public override void process(context in_context)
        {
            network.gameserver s = System.Windows.Application.Current.FindResource("game_server") as network.gameserver;
            if (s != null)
            {
                if (s.Running)
                {
                    process_server_info message = new process_server_info();
                    in_context.Connection.sendmessage(in_context.IPEndPoint, message);
                }
            }
        }

        public override void serialize(stream.stream in_Stream)
        {
            in_Stream.begin("request_server_info")
            .end();
        }
    }
}
